package hpasControllers;

import hpasDAO.DetailedTypeDAO;
import hpasDAO.GeneralTypeDAO;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class HardwareTypeMgmtController implements ActionListener
{
    // 界面元件
    private JList<String> generalTypeNamesList;
    private JList<String> detailedTypeNamesList;
    private JButton addButton;
    private JButton modifyButton;
    private JButton removeButton;

    // 后端接口
    private GeneralTypeDAO generalTypeDAO;
    private DetailedTypeDAO detailedTypeDAO;

    // 方法
    /** 处理监听动作 **/
    @Override
    public void actionPerformed(ActionEvent e)
    {}

    /** 交互：添加大类 **/
    public void addGeneralTypeProcess()
    {}

    /** 交互：添加小类 **/
    public void addDetailedTypeProcess()
    {}

    /** 交互：修改类别信息 **/
    public void editTypeInfo()
    {}

    // Getter & Setter
    public JList<String> getGeneralTypeNamesList()
    {
        return generalTypeNamesList;
    }

    public void setGeneralTypeNamesList(JList<String> generalTypeNamesList)
    {
        this.generalTypeNamesList = generalTypeNamesList;
    }

    public JList<String> getDetailedTypeNamesList()
    {
        return detailedTypeNamesList;
    }

    public void setDetailedTypeNamesList(JList<String> detailedTypeNamesList)
    {
        this.detailedTypeNamesList = detailedTypeNamesList;
    }

    public JButton getAddButton()
    {
        return addButton;
    }

    public void setAddButton(JButton addButton)
    {
        this.addButton = addButton;
    }

    public JButton getModifyButton()
    {
        return modifyButton;
    }

    public void setModifyButton(JButton modifyButton)
    {
        this.modifyButton = modifyButton;
    }

    public JButton getRemoveButton()
    {
        return removeButton;
    }

    public void setRemoveButton(JButton removeButton)
    {
        this.removeButton = removeButton;
    }

    public GeneralTypeDAO getGeneralTypeDAO()
    {
        return generalTypeDAO;
    }

    public void setGeneralTypeDAO(GeneralTypeDAO generalTypeDAO)
    {
        this.generalTypeDAO = generalTypeDAO;
    }

    public DetailedTypeDAO getDetailedTypeDAO()
    {
        return detailedTypeDAO;
    }

    public void setDetailedTypeDAO(DetailedTypeDAO detailedTypeDAO)
    {
        this.detailedTypeDAO = detailedTypeDAO;
    }

}
